//1.制定路由规则
//2.造一个路由器管理这些规则
import Vue from 'vue'
import VueRouter from 'vue-router'
//引入各个组件
import About from '../components/About.vue'
import Home from '../components/Home.vue'

Vue.use(VueRouter)

//造一个路由器
const router = new VueRouter({
	//编写一堆具体规则
	routes:[
		{
			path:'/about',
			component:About
		},
		{
			path:'/home',
			component:Home
		}
	]
})

//暴露路由器
export default router